package t1;

import java.util.Arrays;

/*
* 这个类 定义编码的数据结构 拥有下列信息
* -  px 概率值
- fx 概率函数值
- Fbax  修正概率函数值
- 编码的长度
- 存储二进制比特的数组
* */
public class SFE_s {
    private char word;  //码字
    private double px;  //概率值
    private double fx;  //概率函数值
    private double fbax; //修正概率函数值
    private int lx;  //编码长度
    private String code;
    private String trans;

    @Override
    public String toString() {
        return "SFE_s{" +
                "word=" + word +
                "| px=" + px +
                ", fx=" + fx +
                ", fbax=" + fbax +
                ", lx=" + lx +
                "|code='" + code + '\'' +
                "| trans='" + trans + '\'' +
                '}';
    }

    public char getWord() {
        return word;
    }

    public void setWord(char word) {
        this.word = word;
    }

    public double getPx() {
        return px;
    }

    public void setPx(double px) {
        this.px = px;
    }

    public double getFx() {
        return fx;
    }

    public void setFx(double fx) {
        this.fx = fx;
    }

    public double getFbax() {
        return fbax;
    }

    public void setFbax(double fbax) {
        this.fbax = fbax;
    }

    public int getLx() {
        return lx;
    }

    public void setLx(int lx) {
        this.lx = lx;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTrans() {
        return trans;
    }

    public void setTrans(String trans) {
        this.trans = trans;
    }

    public SFE_s(char word, double px, double fx, double fbax, int lx, String code, String trans) {
        this.word = word;
        this.px = px;
        this.fx = fx;
        this.fbax = fbax;
        this.lx = lx;
        this.code = code;
        this.trans = trans;
    }
}
